package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.leftmenu.user;

import br.edu.ufcg.lsd.wbis.ui.client.beans.UserInfo;
import br.edu.ufcg.lsd.wbis.ui.client.ui.GenericWindow;
import br.edu.ufcg.lsd.wbis.ui.client.ui.ResetButtonListener;
import br.edu.ufcg.lsd.wbis.ui.client.ui.management.InfoManager;

import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.TabPanel;

/**
 * This is the Register Panel.
 * 
 * @author Carla Souza
 * @author Renato Miceli
 */
public class SearchWindow extends GenericWindow {
	
	/**
	 * The Register Panel.
	 * @param centerPanel 
	 */
	public SearchWindow(InfoManager<UserInfo> loggedManager, TabPanel centerPanel) {
		this.setTitle("Search users");
		this.setWidth(450);
		this.setHeight(400);
		
		this.setMinWidth(200);
		this.setMinHeight(100);

		final SearchFormPanel searchFormPanel = new SearchFormPanel();

		this.addButton(new Button("Search", new SearchButtonListener(this, centerPanel, loggedManager, searchFormPanel)));
		this.addButton(new Button("Clear", new ResetButtonListener(searchFormPanel)));
		this.add(searchFormPanel);

		this.show();
	}
}
